<!-- 用户咨询，报错，问答 -->
<php>	if(!in_array($dialogueData['advisorytype'],$dialogueData['showtype'])){
			$dialogueData['advisorytype']=$dialogueData['showtype'][0];
		}
</php>
			
<script type="text/javascript">
var tmp_hadsubmited = false;
function submitadvisory(){
	var pop_input_alert = $('#k_confirm_div').find('#pop_input_alert');
	pop_input_alert.text('');
	var pop_question = $.trim($('#k_confirm_div').find('#pop_question').val());
	if(pop_question==''){
		pop_input_alert.text('请录入内容！');
		return;
	}
	if(pop_question.length>100){pop_input_alert.text('录入内容需小于100字符！');return;}
	tmp_hadsubmited = true;
	//alert($('#k_confirm_div').find('#pop_opt').val());
	$.kajax({      
		ajx_rtn_type:'JSON',
		url: "{$dialogueData['surl']}" ,      
		type:'post',
		data:{ 	qtext:pop_question
				,opttype:$('#k_confirm_div').find('#pop_opt').val()
			 },
		//async: false ,
		success: function(obj){ 
			tmp_hadsubmited = false;
			if(obj.status==1){
				k_success(obj.msg);
			}else{
				k_error(obj.msg);
			}
		}
	});
}
function _tmp_pop_style(nav_rel_){
	k_changeGroupStyle('k_confirm_div',' #pop_tab_nav > ul > li > a ',nav_rel_,'on');
	$('#k_confirm_div').find('#pop_opt').val(nav_rel_);
}
</script>
<div style="width:410px;" class="pop_form alL" id="k_confirm_div">
	
	<div id="pop_tab_nav" class="tab-menu"><!-- 切换标签 begin  -->
		<ul>
			<php>if(in_array('suggest',$dialogueData['showtype'])){</php>
		    	<li><a href="javascript:_tmp_pop_style('suggest');" rel="suggest" 
		    		<php>if($dialogueData['advisorytype']=='suggest'){</php>class="on"<php>}</php> 	><span>建议</span></a></li>
		    <php>}</php>
		    <php>if(in_array('question',$dialogueData['showtype'])){</php>
		    	<li><a rel="question" href="javascript:_tmp_pop_style('question');" 
		    		<php>if($dialogueData['advisorytype']=='question'){</php>class="on"<php>}</php> 	><span>疑问</span></a></li>
		    <php>}</php>
		    <php>if(in_array('error',$dialogueData['showtype'])){</php>
		    <li><a rel="error" href="javascript:_tmp_pop_style('error');" 
		    		<php>if($dialogueData['advisorytype']=='error'){</php>class="on"<php>}</php> ><span>报错</span></a></li>
		    <php>}</php>
	  	</ul>
	</div>
	
	<div class="c"></div>
	<div class="pop_form_li" style="margin-right:0px">
		<div style="text-align: center; margin:10px 15px">
			<span style="padding-top: 5px;vertical-align: top;">内容：</span>
			<textarea id="pop_question" class="normal_textarea" style="width:263px;height:60px;"></textarea>
			<span id="pop_charcnt" name="pop_charcnt" style="padding: 0px 0 0 5px;color:blue" title="最多可录入100字">
				<span id="sms_input_no" style="font-size:16px;color:red; font-weight:bold">100</span>字
				</span>
		</div>
	</div>
	<div class="c"></div>
	<div class="answers" style="">
	<span style="color:red;float:left;font-weight:bold;margin:0px 0px 0px 8px;" id='pop_input_alert'></span>
	<input type="hidden" value="{$dialogueData['advisorytype']}" id="pop_opt">
	<input type="button" class="btn_ok" onclick="submitadvisory()" value="确定" id="k_confirm_btn">
	<input type="button" class="btn_cancel" onclick="ui.box.close()" value="取消" id="k_confirm_btn">
	</div>
</div>